package com.zhiche.lisa.bms.service.statistics.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.zhiche.lisa.bms.dao.mapper.statistics.StaticNovoPayCostMapper;
import com.zhiche.lisa.bms.dao.model.statistics.StaticNovoPayCost;
import com.zhiche.lisa.bms.pojo.bo.statistics.NovoPayCostBO;
import com.zhiche.lisa.bms.service.statistics.StaticNovoPayCostService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

/**
 * <p>
 * 应付费用统计表-新 服务实现类
 * </p>
 *
 * @author linbao
 * @since 2019-09-24
 */
@Service
@Slf4j
public class StaticNovoPayCostServiceImpl extends ServiceImpl<StaticNovoPayCostMapper, StaticNovoPayCost> implements StaticNovoPayCostService {

    /**
     * 获取未处理的数据
     *
     * @param intCount
     * @return
     */
    @Override
    public List<NovoPayCostBO> getDistinctWaybillPayCostNoDeal(int intCount) {
        List<NovoPayCostBO> payCostBOList = baseMapper.getDistinctWaybillPayCostNoDeal();
        if (intCount > 0) {
            return payCostBOList.stream().limit(intCount).collect(Collectors.toList());
        }
        return payCostBOList;
    }
}
